Optimal. Leaf size=104 \[ \frac {1}{2} x \sqrt {d x-c} \sqrt {c+d x} \left (b-\frac {2 a d^2}{c^2}\right )-\frac {\left (b c^2-2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d}+\frac {a (d x-c)^{3/2} (c+d x)^{3/2}}{c^2 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {454, 38, 63, 217, 206} \[ \frac {1}{2} x \sqrt {d x-c} \sqrt {c+d x} \left (b-\frac {2 a d^2}{c^2}\right )-\frac {\left (b c^2-2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d}+\frac {a (d x-c)^{3/2} (c+d x)^{3/2}}{c^2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 38
Rule 63
Rule 206
Rule 217
Rule 454
Rubi steps
\begin {align*} \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^2} \, dx &=\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{c^2 x}+\left (b-\frac {2 a d^2}{c^2}\right ) \int \sqrt {-c+d x} \sqrt {c+d x} \, dx\\ &=\frac {1}{2} \left (b-\frac {2 a d^2}{c^2}\right ) x \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{c^2 x}+\frac {1}{2} \left (-b c^2+2 a d^2\right ) \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {1}{2} \left (b-\frac {2 a d^2}{c^2}\right ) x \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{c^2 x}+\frac {\left (-b c^2+2 a d^2\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{d}\\ &=\frac {1}{2} \left (b-\frac {2 a d^2}{c^2}\right ) x \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{c^2 x}+\frac {\left (-b c^2+2 a d^2\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ &=\frac {1}{2} \left (b-\frac {2 a d^2}{c^2}\right ) x \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{c^2 x}-\frac {\left (b c^2-2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 101, normalized size = 0.97 \[ \frac {\sqrt {d x-c} \sqrt {c+d x} \left (c d \left (b x^2-2 a\right ) \sqrt {1-\frac {d^2 x^2}{c^2}}+x \left (b c^2-2 a d^2\right ) \sin ^{-1}\left (\frac {d x}{c}\right )\right )}{2 c d x \sqrt {1-\frac {d^2 x^2}{c^2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.22, size = 83, normalized size = 0.80 \[ -\frac {2 \, a d^{2} x - {\left (b c^{2} - 2 \, a d^{2}\right )} x \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right ) - {\left (b d x^{2} - 2 \, a d\right )} \sqrt {d x + c} \sqrt {d x - c}}{2 \, d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.40, size = 110, normalized size = 1.06 \[ -\frac {\frac {32 \, a c^{2} d^{2}}{{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}} - 2 \, {\left ({\left (d x + c\right )} b - b c\right )} \sqrt {d x + c} \sqrt {d x - c} - {\left (b c^{2} - 2 \, a d^{2}\right )} \log \left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4}\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.06, size = 153, normalized size = 1.47 \[ \frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (2 a \,d^{2} x \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )-b \,c^{2} x \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )+\sqrt {d^{2} x^{2}-c^{2}}\, b d \,x^{2} \mathrm {csgn}\relax (d )-2 \sqrt {d^{2} x^{2}-c^{2}}\, a d \,\mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )}{2 \sqrt {d^{2} x^{2}-c^{2}}\, d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.50, size = 105, normalized size = 1.01 \[ -\frac {b c^{2} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{2 \, d} + a d \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right ) + \frac {1}{2} \, \sqrt {d^{2} x^{2} - c^{2}} b x - \frac {\sqrt {d^{2} x^{2} - c^{2}} a}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.49, size = 243, normalized size = 2.34 \[ \frac {a\,d+\frac {5\,a\,d\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}}{\frac {4\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{\sqrt {-c}-\sqrt {d\,x-c}}+\frac {4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^3}}-4\,a\,d\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )+\frac {b\,x\,\sqrt {c+d\,x}\,\sqrt {d\,x-c}}{2}-\frac {b\,c^2\,\ln \left (d\,x+\sqrt {c+d\,x}\,\sqrt {d\,x-c}\right )}{2\,d}+\frac {a\,d\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{4\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b x^{2}\right ) \sqrt {- c + d x} \sqrt {c + d x}}{x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________